package com.repository;


import com.entity.SysDeployHistory;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Yadasu
 * @date 2021/1/25 11:03
 */
public interface SysDeployHistoryRepository extends JpaRepository<SysDeployHistory,Integer> {
    @Modifying
    @Transactional
    @Query(value ="UPDATE sys_deploy_history  a set a.deploy_date=NOW() where app_name=?1" ,nativeQuery = true)
    Integer findByAppName(String name);
}
